package com.robmayhew.jsc;


import java.util.*;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class Project
{
    private Set ignoredWords = new HashSet();

    public Project()
    {
    }

    public void setDictionary(String s){
        try{
            BufferedReader in = new BufferedReader(new FileReader(s));
            while(in.ready()){
                String line = in.readLine();
                if(line != null){
                    line = line.trim();
                    addIgnoredWord(line);
                }
            }
            in.close();
        }catch(IOException e){
            throw new RuntimeException(e);
        }
    }

    public void addIgnoredWord(String word)
    {
        ignoredWords.add(word);
    }

    public boolean isWordIgnored(String word)
    {
        return ignoredWords.contains(word);
    }
}

